<template>
  <div class="body">
    <router-link :to="{path:'/survey/index'}"><a-button>考勤组设置</a-button></router-link>
    <router-link :to="{path:'/survey/setting?groupId=1'}"><a-button>添加考勤组</a-button></router-link>
    <router-link :to="{path:'/survey/attstatistics'}"><a-button>考勤统计管理</a-button></router-link>
    <router-link :to="{path:'/survey/record'}"><a-button>打卡记录</a-button></router-link>
    <router-link :to="{path:'/survey/details'}"><a-button>列表点击详情</a-button></router-link>

    <div style="height: 1px;color: #999999;margin: 12px 0;"></div>
    <div class="day-statistics">
      <div class="day-form">
        <div class="day-form-one">
          <div class="day-form-tit">学生组织：</div>
          <a-select default-value="lucy" class="day-form-in">
            <a-select-option value="jack">
              Jack
            </a-select-option>
            <a-select-option value="lucy">
              Lucy
            </a-select-option>
            <a-select-option value="disabled" disabled>
              Disabled
            </a-select-option>
            <a-select-option value="Yiminghe">
              yiminghe
            </a-select-option>
          </a-select>
        </div>
        <div class="day-form-one">
          <div class="day-form-tit">打卡主题：</div>
          <a-select default-value="lucy" class="day-form-in">
            <a-select-option value="jack">
              Jack
            </a-select-option>
            <a-select-option value="lucy">
              Lucy
            </a-select-option>
            <a-select-option value="disabled" disabled>
              Disabled
            </a-select-option>
            <a-select-option value="Yiminghe">
              yiminghe
            </a-select-option>
          </a-select>
        </div>
        <a-button class="day-form-btn" type="primary" @click="getList()">搜索</a-button>
        <a-button class="day-form-btn" @click="reset">重置</a-button>
      </div>
    </div>
    <a-table style="margin: 24px 0;" :columns="columns" :data-source="workList" class="table"></a-table>
  </div>
</template>
<style scoped="scoped" lang="scss">
  .body {
    padding: 24px;
  }
  .day-statistics {
    .day-form {
      display: flex;
      align-items: center;
      .day-form-tit {
        white-space: nowrap;
      }
      .day-form-one {
        display: flex;
        align-items: center;
      }
      .day-form-in {
        width: 220px;
        margin-right: 40px;
      }
      .day-form-btn {
        margin-right: 10px;
      }
    }
    .table {
      margin-top: 24px;
    }
  }
</style>
<script>
  const columns = [
    {
      title: '学生组织',
      dataIndex: 'userName',
    },
    {
      title: '姓名',
      dataIndex: 'deptName',
    },
    {
      title: '打卡天数',
      dataIndex: 'groupName',
    },
    {
      title: '4-15',
      dataIndex: 'groupName',
    },
    {
      title: '4-16',
      dataIndex: 'groupName',
    },
    {
      title: '4-17',
      dataIndex: 'groupName',
    },
    {
      title: '4-18',
      dataIndex: 'groupName',
    },
  ];
  import { dailyPage } from '@/api/clock'
  export default {
    data() {
      return {
        columns,
        list: [],
      }
    },
    watch: {

    },
    computed: {

    },
    created() {
      this.getList()
    },
    methods: {
      getList() {
        dailyPage(this.param)
        .then(response => {
          this.workList = response.data.records



            this.list = [
                {
                  title: '教师姓名',
                  dataIndex: 'userName',
                },
                {
                  title: '部门',
                  dataIndex: 'deptName',
                },
                {
                  title: '考勤组',
                  dataIndex: 'groupName',
                },
                {
                  title: '类型',
                  dataIndex: 'workMinute',
                },
              ];
        })
        .catch(() => {

        })
      },
    }
  }
</script>
